#!/bin/bash

# 制作镜像并上传到仓库里
docker build -t wind3-nginx ./dockerNginx --force-rm
docker tag wind3-nginx 127.0.0.1:5000/wind3-nginx
docker push 127.0.0.1:5000/wind3-nginx
docker rmi 127.0.0.1:5000/wind3-nginx

docker build -t wind3-redis ./dockerRedis --force-rm
docker tag wind3-redis 127.0.0.1:5000/wind3-redis
docker push 127.0.0.1:5000/wind3-redis
docker rmi 127.0.0.1:5000/wind3-redis
#
docker build -t wind3-mysql ./dockerMysql --force-rm
docker tag wind3-mysql 127.0.0.1:5000/wind3-mysql
docker push 127.0.0.1:5000/wind3-mysql
docker rmi 127.0.0.1:5000/wind3-mysql

#docker rmi -f $(docker images -aq)

docker ps -a | grep "Exited" | awk '{print $1 }'|xargs docker stop
docker ps -a | grep "Exited" | awk '{print $1 }'|xargs docker rm
docker images|grep none|awk '{print $3 }'|xargs docker rmi
